package aclass.rocksea.com.database.db;

import com.litesuits.orm.db.annotation.Column;
import com.litesuits.orm.db.annotation.PrimaryKey;
import com.litesuits.orm.db.annotation.Table;
import com.litesuits.orm.db.enums.AssignType;

import java.util.Date;

/**
 * Created by Mrw on 2017/7/5.
 *
 */

@Table("Message")
public class Message {

    @PrimaryKey(AssignType.AUTO_INCREMENT)
    @Column("_id")
    private int id;

    @Column("_Date")
    private Date date;

    @Column("_Json")
    private String json;

    public Message(String json) {
        date = new Date();
        this.json = json;
    }

    @Override
    public String toString() {
        return "Message{" +
                "id=" + id +
                ", date=" + date +
                ", json='" + json + '\'' +
                '}';
    }
}
